package br.ufpe.cin.rgms.linhapesquisa.apresentacao;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.ufpe.cin.rgms.Facade;
import br.ufpe.cin.rgms.linhapesquisa.modelo.LinhaPesquisa;

public class AlterarLinhaPesquisaServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
	throws ServletException, IOException {
		String titulo = request.getParameter("linhapesquisa");
		System.out.println(titulo);
		LinhaPesquisa linhapesquisa = Facade.getInstance().getLinhaPesquisa(titulo);
		request.setAttribute("linhapesquisaalterar", linhapesquisa);
 
		RequestDispatcher view = request.getRequestDispatcher("alterarlinhapesquisa.jsp");
		view.forward(request, response);
	}
}
